.class public Lcom/teewoo/app/bus/inface/BaseActivity;
.super Landroid/app/Activity;
.source "BaseActivity.java"


# static fields
.field private static final MENU_BUS:I = 0x1

.field private static final MENU_COLLECTION:I = 0x2

.field private static final MENU_EXIT:I = 0x5

.field private static final MENU_NAVIGATION:I = 0x4

.field private static final MENU_SYSTEM:I = 0x3

.field public static final TAG:Ljava/lang/String; = "BaseActivity"

.field public static cityView:Landroid/widget/TextView;


# instance fields
.field protected back:Landroid/view/View;

.field protected context:Landroid/content/Context;

.field protected item_background:[I


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 22
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 35
    const/4 v0, 0x2

    new-array v0, v0, [I

    iput-object v0, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->item_background:[I

    .line 22
    return-void
.end method

.method private exitAlert()V
    .locals 3

    .prologue
    .line 98
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f08001d

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 99
    const v1, 0x7f08004a

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 100
    const v1, 0x7f02005d

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f08004e

    new-instance v2, Lcom/teewoo/app/bus/inface/BaseActivity$1;

    invoke-direct {v2, p0}, Lcom/teewoo/app/bus/inface/BaseActivity$1;-><init>(Lcom/teewoo/app/bus/inface/BaseActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 106
    const v1, 0x7f08004f

    .line 107
    new-instance v2, Lcom/teewoo/app/bus/inface/BaseActivity$2;

    invoke-direct {v2, p0}, Lcom/teewoo/app/bus/inface/BaseActivity$2;-><init>(Lcom/teewoo/app/bus/inface/BaseActivity;)V

    .line 106
    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNeutralButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 112
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 114
    return-void
.end method


# virtual methods
.method public exit()V
    .locals 3

    .prologue
    .line 120
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.MAIN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 121
    .local v1, setIntent:Landroid/content/Intent;
    const-string v2, "android.intent.category.HOME"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 122
    const/high16 v2, 0x1000

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 123
    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->startActivity(Landroid/content/Intent;)V

    .line 124
    const/4 v2, 0x0

    invoke-static {v2}, Ljava/lang/System;->exit(I)V

    .line 125
    const-string v2, "activity"

    invoke-virtual {p0, v2}, Lcom/teewoo/app/bus/inface/BaseActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/ActivityManager;

    .line 126
    .local v0, manager:Landroid/app/ActivityManager;
    invoke-virtual {p0}, Lcom/teewoo/app/bus/inface/BaseActivity;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/app/ActivityManager;->restartPackage(Ljava/lang/String;)V

    .line 127
    return-void
.end method

.method public initialUI()V
    .locals 1

    .prologue
    .line 39
    const v0, 0x7f0a0097

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/inface/BaseActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->back:Landroid/view/View;

    .line 40
    const v0, 0x7f0a0096

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/inface/BaseActivity;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/TextView;

    sput-object p0, Lcom/teewoo/app/bus/inface/BaseActivity;->cityView:Landroid/widget/TextView;

    .line 41
    return-void
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .locals 3
    .parameter "menu"

    .prologue
    const/4 v2, 0x0

    .line 48
    const/4 v0, 0x1

    const v1, 0x7f08000c

    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v2, v0, v2, v1}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    .line 49
    const v1, 0x7f02002d

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 50
    const/4 v0, 0x2

    const v1, 0x7f08000f

    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v2, v0, v2, v1}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    .line 51
    const v1, 0x7f02002e

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 52
    const/4 v0, 0x3

    const v1, 0x7f08000e

    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v2, v0, v2, v1}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    .line 53
    const v1, 0x7f020032

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 54
    const/4 v0, 0x4

    const v1, 0x7f08000d

    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v2, v0, v2, v1}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    .line 55
    const v1, 0x7f020030

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 56
    const/4 v0, 0x5

    const v1, 0x7f080010

    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v2, v0, v2, v1}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    .line 57
    const v1, 0x7f02002f

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 59
    invoke-super {p0, p1}, Landroid/app/Activity;->onPrepareOptionsMenu(Landroid/view/Menu;)Z

    move-result v0

    return v0
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 6
    .parameter "item"

    .prologue
    .line 66
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v4

    packed-switch v4, :pswitch_data_0

    .line 91
    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/app/Activity;->onOptionsItemSelected(Landroid/view/MenuItem;)Z

    move-result v4

    return v4

    .line 68
    :pswitch_0
    new-instance v3, Landroid/content/Intent;

    iget-object v4, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->context:Landroid/content/Context;

    const-class v5, Lcom/teewoo/app/bus/ui/Home4StaticMap;

    invoke-direct {v3, v4, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 69
    .local v3, intentTobus:Landroid/content/Intent;
    invoke-virtual {p0, v3}, Lcom/teewoo/app/bus/inface/BaseActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 72
    .end local v3           #intentTobus:Landroid/content/Intent;
    :pswitch_1
    new-instance v0, Landroid/content/Intent;

    iget-object v4, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->context:Landroid/content/Context;

    const-class v5, Lcom/teewoo/app/bus/ui/MyCollectionActivity;

    invoke-direct {v0, v4, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 73
    .local v0, intentToCollection:Landroid/content/Intent;
    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/inface/BaseActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 76
    .end local v0           #intentToCollection:Landroid/content/Intent;
    :pswitch_2
    new-instance v1, Landroid/content/Intent;

    iget-object v4, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->context:Landroid/content/Context;

    const-class v5, Lcom/teewoo/app/bus/ui/WebViewActivity;

    invoke-direct {v1, v4, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 77
    .local v1, intentToNavigation:Landroid/content/Intent;
    const-string v4, "com.teewoo.app.bus.url"

    const-string v5, "http://doudou360.com/DouDouWeb.htm"

    invoke-virtual {v1, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 78
    invoke-virtual {p0, v1}, Lcom/teewoo/app/bus/inface/BaseActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 81
    .end local v1           #intentToNavigation:Landroid/content/Intent;
    :pswitch_3
    iget-object v4, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->context:Landroid/content/Context;

    if-eqz v4, :cond_0

    .line 82
    new-instance v2, Landroid/content/Intent;

    iget-object v4, p0, Lcom/teewoo/app/bus/inface/BaseActivity;->context:Landroid/content/Context;

    const-class v5, Lcom/teewoo/app/bus/ui/Home4StaticMap;

    invoke-direct {v2, v4, v5}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 83
    .local v2, intentToSystem:Landroid/content/Intent;
    const-string v4, "back home"

    const/4 v5, 0x3

    invoke-virtual {v2, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 84
    invoke-virtual {p0, v2}, Lcom/teewoo/app/bus/inface/BaseActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 88
    .end local v2           #intentToSystem:Landroid/content/Intent;
    :pswitch_4
    invoke-direct {p0}, Lcom/teewoo/app/bus/inface/BaseActivity;->exitAlert()V

    goto :goto_0

    .line 66
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_3
        :pswitch_2
        :pswitch_4
    .end packed-switch
.end method

.method protected putBack()V
    .locals 1

    .prologue
    .line 135
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lcom/teewoo/app/bus/inface/BaseActivity;->moveTaskToBack(Z)Z

    .line 136
    return-void
.end method
